<script setup lang="ts">
import { useMemberStore } from '@/stores'
import { http } from '@/utils/http'
const store = useMemberStore()

const getProfile = async () => {
  const res = await http({
    method: 'GET',
    url: '/home/banner',
  })
  console.log('我是res', res)
}
const login = async () => {
  const res = await http({
    method: 'POST',
    url: '/login/wxMin',
  })
  console.log(res)
}
</script>

<template>
  <view class="my">
    <view>会员信息：{{ store.profile }}</view>
    <button @tap="store.setProfile({ nickname: '哈哈' })">保存</button>
    <button @tap="store.clearProfile">清除</button>
    <button @tap="getProfile">获取</button>
    <button @tap="login">登录</button>
  </view>
</template>

<style lang="scss">
//
</style>
